<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<div class="col-sm-2">
	<c:if test="${agentId != null }">
		<button style="margin-left:20px;" class="btn btn-sm btn-primary" title="点击返回" onclick="returnTop()">
			
			正在查看【${agentId}】的下属代理
			<i class="ace-icon fa fa-reply icon-on-right"></i>
		</button>
	</c:if>
</div>
<div class="col-xs-12" style="margin-top:5px;">
	<table id="simple-table" class="table table-bordered table-hover">
		<thead>
			<tr>
				<th class="center">序号</th>
				<th class="center">用户头像</th>
				<th class="center">ID</th>
				<th class="center">用户昵称</th>
				<th class="center">邀请码</th>
				<th class="center">代理级别</th>
				<th class="center">房卡数</th>
				<th class="center">金币数</th>
				<th class="center">充值总额</th>
				<th class="center">上级ID</th>
				<th class="center">微信号</th>
				<th class="center">电话</th>
				<th class="center">状态</th>
				<th class="center">操作</th>
			</tr>
		</thead>
		
		<tbody>
			<c:forEach items="${data}" var="itm" varStatus="i">  
		       <tr>
					<td class="center">
						${i.index + 1}
					</td>
				    <td class="center">
				    <img width=50 height=50 src="${itm.userImg }" onerror="onerror=null;src='https://res.wx.qq.com/a/wx_fed/common_assets/16120602/win_weixin21/images/phone_logo2x.png'" />
				    </td>
					<td class="center">
						<a href="javascript:void(0)" onclick="nextAgent(${itm.agentId })" title="点击查看下属代理">${itm.userId }
						<i class="ace-icon fa fa-sort-amount-desc bigger-110 icon-only"></i>
						</a>
					</td>
					<td class="center">${itm.nickName }</td>
					<td class="center">${itm.agentId }</td>
					<td class="center">${itm.agentLevel }</td>
		
					<td class="center">
						${itm.goldeggs }
					</td>
					<td class="center">${itm.score }</td>
					<td class="center">${itm.totalFee }</td>
					<td class="center">${itm.groupId }</td>
					<td class="center">${itm.accounts }</td>
					<td class="center">${itm.phoneNum }</td>
					<td class="center">
					<c:set var="checked" value="checked=checked" />
					<c:if test="${itm.online == 0}">
					<c:set var="checked" value="" />
					</c:if>
					<label>
						<input name="switch-field-1"  onclick="return false;" class="ace ace-switch ace-switch-3" type="checkbox" ${checked }>
						<span class="lbl" style='cursor:auto;'></span>
					</label>
					</td>
					<td class="center">
						<button onclick="loadPlayerData(${itm.userId})" class="btn btn-danger btn-xs" title="查看下属玩家">
							<i class="ace-icon fa fa-sort-amount-desc bigger-110 icon-only"></i>
						</button>
					</td>
				</tr>
		    </c:forEach>  
				
			</tbody>
		</table>
		<%@include file="../../paging.jsp" %>
</div>

